package cate.common.table.activity.specall.sheet;

import cate.common.table.ESheet;
import cate.common.table.activity.specall.row.SpeCallBaseRow;

import java.util.List;
import java.util.stream.Collectors;

public class SpeCallBaseSheet extends ESheet<SpeCallBaseRow> {
    @Override
    public String getSheetName() {
        return "召唤基础";
    }

    public SpeCallBaseRow getRow(int configId, int type) {
        return getList().stream().filter(e -> e.configId == configId && e.type == type).findAny().orElse(null);
    }

    public List<SpeCallBaseRow> getRows(int configId) {
        return getList().stream().filter(e -> e.configId == configId).collect(Collectors.toList());
    }
}
